package com.wsq.function;

import java.math.BigDecimal;

public class EngineTest {

	private void testNthPower() {
		double value = 9;
		double test = (double) 1 / 2;
		System.out.println(test);
		double result = Math.pow(value, test);
		java.lang.System.out.println(result);
	}
	
	private BigDecimal factorial(int value){
		if(value==0){
			return new BigDecimal(1);
		}
		
		BigDecimal decimal=new BigDecimal(1);
		if(value==1){
			return decimal;
		}
		for(int i=value;i>=2;i--){
			decimal=decimal.multiply(new BigDecimal(value));
		}
		return decimal;
	}

}
